﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebBanThuoc.pageSub
{
    public partial class CKEditorBrowseImageFile : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string str_UploadFolder = System.Configuration.ConfigurationManager.AppSettings["AnhTinTuc"];
            string str_FolderPath_Server = Server.MapPath(str_UploadFolder);

            //string CKEditorFuncNum = Request.QueryString["CKEditorFuncNum"];
            //if (CKEditorFuncNum == null)
            //{
            //    CKEditorFuncNum = Request.Params["CKEditorFuncNum"];
            //}
            //Session.Add("pageCKEditorBrowseImageFile_CKEditorFuncNum", CKEditorFuncNum);

            string[] fileNames = Directory.GetFiles(str_FolderPath_Server).Select(Path.GetFileName).Select(p => str_UploadFolder.Replace("..","") + "/" +p.Substring(0)).ToArray();
            Session.Add("pageCKEditorBrowseImageFile_dataImage",fileNames);            

        }
    }
}